import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const router = new VueRouter({
  mode: "history",
  routes: [
    {
      path: "/",
      redirect: "/start",
    },
    {
      path: "/register",
      name: "Register",
      component: () => import("../pages/register"),
      meta: {
        showFooter: false,
      },
    },
    {
      path: "/start",
      name: "start",
      component: () => import("../pages/start"),
      meta: {
        showFooter: false,
      },
    },
    {
      path: "/login",
      name: "Login",
      component: () => import("../pages/login"),
      meta: {
        showFooter: false,
      },
    },
    {
      path: "/home",
      name: "Home",
      component: () => import("../pages/home"),
      meta: {
        showFooter: true,
      },
    },
    {
      path: "/detail/:id",
      name: "Detail",
      component: () => import("../pages/detail"),
      meta: {
        showFooter: false,
      },
    },
    {
      path: "/beauty",
      name: "beauty",
      component: () => import("../pages/beauty"),
      meta: {
        showFooter: true,
      },
    },
    {
      path: "/publish",
      name: "publish",
      component: () => import("../pages/publish"),
      meta: {
        showFooter: true,
      },
    },
    //个人中心+地址管理+消息中心
    {
      path: "/mine",
      name: "Mine",
      component: () => import("../pages/mine"),
      meta: {
        showFooter: true,
      },
    },
    {
      path: "/idear",
      name: "Idear",
      component: () => import("../pages/idear"),
      meta: {
        showFooter: false,
      },
    },
    {
      path: "/renzeng",
      name: "Renzeng",
      component: () => import("../pages/renzeng"),
      meta: {
        showFooter: true,
      },
    },
    {
      path: "/address",
      name: "Address",
      component: () => import("../pages/address"),
      meta: {
        showFooter: false,
      },
    },
    {
      path: "/order",
      name: "Order",
      component: () => import("../pages/order"),
      meta: {
        showFooter: false,
      },
    },
    {
      path: "/adaddress",
      name: "Adaddress",
      component: () => import("../pages/address/adaddress"),
      meta: {
        showFooter: false,
      },
    },
  ],
});

export default router;
